package com.yzh.www.springboot;


import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * rabbitmq
 * com.yzh.www.springboot
 *
 * @author 姚自豪
 * @create 2022-03-30 21:21
 */

@Component
public class Sendspring {

    @Autowired
    private AmqpTemplate amqpTemplate;

    public void hello() {
        String message = "二二";
        String queuename ="boot_quene";
        amqpTemplate.convertAndSend(queuename, message);
    }
}